package com.example.gb28181.response.impl;

import com.example.gb28181.enums.SipMethodEnum;
import com.example.gb28181.request.SIPRequestProcessor;
import com.example.gb28181.response.SIPResponseProcessor;
import com.example.gb28181.service.SIPProcessorObserver;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.sip.*;
import javax.sip.header.DateHeader;
import javax.sip.header.HeaderFactory;
import javax.sip.message.MessageFactory;
import javax.sip.message.Request;
import javax.sip.message.Response;
import java.text.ParseException;
import java.util.Calendar;

/**
 * @E-mail cwm3412638@163.com
 * @Author cwm
 * @Date 2022/7/21
 */
@Component
@AllArgsConstructor
public class RegisterResponseProcessor implements InitializingBean, SIPResponseProcessor {

    private final SIPProcessorObserver sipProcessorObserver;
    private final static SipMethodEnum REGISTER = SipMethodEnum.REGISTER;


    @Override
    public void afterPropertiesSet() throws Exception {
        sipProcessorObserver.addResponseProcessor(REGISTER, this);
    }

    @Override
    public void process(ResponseEvent evt) {

    }

}
